#!/usr/bin/env bash
# SPDX-License-Identifier: BSD-3-Clause
# Copyright 2017-2020, Intel Corporation

#
# src/test/rpmem_addr_ext/TEST0 -- advanced unittest for invalid target formats
#

. ../unittest/unittest.sh

require_test_type short

# matching logs works only with the debug version
require_build_type debug

require_nodes 2

# libfabric version < 1.4.3 does not handle this test properly
require_node_libfabric 0 $RPMEM_PROVIDER 1.4.3
require_node_libfabric 1 $RPMEM_PROVIDER 1.4.3

setup

init_rpmem_on_node 1 0

TARGETS=targets.in

copy_files_to_node 1 ${NODE_TEST_DIR[1]} $TARGETS

expect_normal_exit run_on_node 1 ./rpmem_addr_ext$EXESUFFIX $TARGETS

check

pass
